<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NumCpp: asarray.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NumCppLogoDoxygen.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">NumCpp
   &#160;<span id="projectnumber">2.4.0</span>
   </div>
   <div id="projectbrief">A Templatized Header Only C++ Implementation of the Python NumPy Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('asarray_8hpp_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">asarray.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="asarray_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_type_traits_8hpp.html">NumCpp/Core/Internal/TypeTraits.hpp</a>&quot;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_nd_array_8hpp.html">NumCpp/NdArray.hpp</a>&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;array&gt;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &lt;deque&gt;</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &lt;forward_list&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &lt;initializer_list&gt;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &lt;iterator&gt;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &lt;list&gt;</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &lt;set&gt;</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacenc.html">nc</a></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;{</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        std::enable_if_t&lt;is_valid_dtype_v&lt;dtype&gt;, <span class="keywordtype">int</span>&gt; = 0&gt;</div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">   58</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(std::initializer_list&lt;dtype&gt; inList) </div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    {</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inList);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    }</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160; </div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype&gt;</div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="namespacenc.html#a6a6f1083d41b9d345d6dae5093d7632b">   76</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(std::initializer_list&lt;std::initializer_list&lt;dtype&gt; &gt; inList)</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    {</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inList);</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    }</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, <span class="keywordtype">size_t</span> ArraySize, </div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        std::enable_if_t&lt;is_valid_dtype_v&lt;dtype&gt;, <span class="keywordtype">int</span>&gt; = 0&gt;</div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="namespacenc.html#ae2e0f4084163e9be08e324a6f3c10579">   95</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(std::array&lt;dtype, ArraySize&gt;&amp; inArray, <span class="keywordtype">bool</span> <a class="code" href="namespacenc.html#a9bbe10d41fdbd74a6254bad44c7c7cf6">copy</a> = <span class="keyword">true</span>) </div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    {</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inArray, <a class="code" href="namespacenc.html#a9bbe10d41fdbd74a6254bad44c7c7cf6">copy</a>);</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    }</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160; </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, <span class="keywordtype">size_t</span> Dim0Size, <span class="keywordtype">size_t</span> Dim1Size&gt;</div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="namespacenc.html#a35116b2646ecd25b63586fa987991f21">  113</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(std::array&lt;std::array&lt;dtype, Dim1Size&gt;, Dim0Size&gt;&amp; inArray, <span class="keywordtype">bool</span> <a class="code" href="namespacenc.html#a9bbe10d41fdbd74a6254bad44c7c7cf6">copy</a> = <span class="keyword">true</span>) </div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    {</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inArray, <a class="code" href="namespacenc.html#a9bbe10d41fdbd74a6254bad44c7c7cf6">copy</a>);</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    }</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160; </div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, </div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        std::enable_if_t&lt;is_valid_dtype_v&lt;dtype&gt;, <span class="keywordtype">int</span>&gt; = 0&gt;</div>
<div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="namespacenc.html#a37aab9b1478f5d5abea3d02029fb2f2d">  132</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(std::vector&lt;dtype&gt;&amp; inVector, <span class="keywordtype">bool</span> <a class="code" href="namespacenc.html#a9bbe10d41fdbd74a6254bad44c7c7cf6">copy</a> = <span class="keyword">true</span>) </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    {</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inVector, <a class="code" href="namespacenc.html#a9bbe10d41fdbd74a6254bad44c7c7cf6">copy</a>);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    }</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype&gt;</div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="namespacenc.html#a5ac399ecf8e26717e118be6d04164d31">  148</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(<span class="keyword">const</span> std::vector&lt;std::vector&lt;dtype&gt;&gt;&amp; inVector) </div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    {</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inVector);</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    }</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160; </div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, <span class="keywordtype">size_t</span> Dim1Size&gt;</div>
<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="namespacenc.html#aab50ba883dd36c374c2b0d34c22f7bc1">  166</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(std::vector&lt;std::array&lt;dtype, Dim1Size&gt;&gt;&amp; inVector, <span class="keywordtype">bool</span> <a class="code" href="namespacenc.html#a9bbe10d41fdbd74a6254bad44c7c7cf6">copy</a> = <span class="keyword">true</span>) </div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    {</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inVector, <a class="code" href="namespacenc.html#a9bbe10d41fdbd74a6254bad44c7c7cf6">copy</a>);</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    }</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160; </div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, </div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        std::enable_if_t&lt;is_valid_dtype_v&lt;dtype&gt;, <span class="keywordtype">int</span>&gt; = 0&gt;</div>
<div class="line"><a name="l00183"></a><span class="lineno"><a class="line" href="namespacenc.html#a430dab2027f102a689a812134e1f9655">  183</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(<span class="keyword">const</span> std::deque&lt;dtype&gt;&amp; inDeque) </div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    {</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inDeque);</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    }</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160; </div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype&gt;</div>
<div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="namespacenc.html#ac7a31dc08b1ea7cbdc71c22cad70e328">  199</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(<span class="keyword">const</span> std::deque&lt;std::deque&lt;dtype&gt;&gt;&amp; inDeque) </div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    {</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inDeque);</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    }</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160; </div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, <span class="keyword">typename</span> dtypeComp&gt;</div>
<div class="line"><a name="l00216"></a><span class="lineno"><a class="line" href="namespacenc.html#aaef8615d9fb222814f2849fb0915dd81">  216</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(<span class="keyword">const</span> std::set&lt;dtype, dtypeComp&gt;&amp; inSet) </div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    {</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inSet);</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    }</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160; </div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype&gt;</div>
<div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="namespacenc.html#a6280fea16d0710fe5e257c3d4cb3a85d">  233</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(<span class="keyword">const</span> std::list&lt;dtype&gt;&amp; inList) </div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    {</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(inList);</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    }</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160; </div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Iterator&gt;</div>
<div class="line"><a name="l00250"></a><span class="lineno"><a class="line" href="namespacenc.html#aa0127b6d17a87db3f9deed78e90f54bd">  250</a></span>&#160;    <span class="keyword">auto</span> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(Iterator iterBegin, Iterator iterEnd) </div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    {</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;typename std::iterator_traits&lt;Iterator&gt;::value_type</a>&gt;(iterBegin, iterEnd);</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    }</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160; </div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype&gt;</div>
<div class="line"><a name="l00267"></a><span class="lineno"><a class="line" href="namespacenc.html#a35bad04da98984458f265fc1dcd66b00">  267</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(<span class="keyword">const</span> dtype* iterBegin, <span class="keyword">const</span> dtype* iterEnd) </div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    {</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(iterBegin, iterEnd);</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;    }</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160; </div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype&gt;</div>
<div class="line"><a name="l00284"></a><span class="lineno"><a class="line" href="namespacenc.html#ac2c02eb2fd3b28ab815ab5d678649a13">  284</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(<span class="keyword">const</span> dtype* ptr, <a class="code" href="namespacenc.html#af0f49663fb63332596e2e6327009d581">uint32</a> <a class="code" href="namespacenc.html#a25f36ba02112a206936fae22b0724bb9">size</a>) </div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;    {</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(ptr, <a class="code" href="namespacenc.html#a25f36ba02112a206936fae22b0724bb9">size</a>);</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    }</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160; </div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype&gt;</div>
<div class="line"><a name="l00302"></a><span class="lineno"><a class="line" href="namespacenc.html#a49d751314929b591b3e1a9d79f81d6ff">  302</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(<span class="keyword">const</span> dtype* ptr, <a class="code" href="namespacenc.html#af0f49663fb63332596e2e6327009d581">uint32</a> numRows, <a class="code" href="namespacenc.html#af0f49663fb63332596e2e6327009d581">uint32</a> numCols) </div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    {</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(ptr, numRows, numCols);</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;    }</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160; </div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, <span class="keyword">typename</span> Bool,</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;        std::enable_if_t&lt;std::is_same&lt;Bool, bool&gt;::value, <span class="keywordtype">int</span>&gt; = 0&gt;</div>
<div class="line"><a name="l00322"></a><span class="lineno"><a class="line" href="namespacenc.html#ae2b23e323b2d5e16933587ede8c5d115">  322</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(dtype* ptr, <a class="code" href="namespacenc.html#af0f49663fb63332596e2e6327009d581">uint32</a> <a class="code" href="namespacenc.html#a25f36ba02112a206936fae22b0724bb9">size</a>, Bool takeOwnership) noexcept</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;    {</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(ptr, <a class="code" href="namespacenc.html#a25f36ba02112a206936fae22b0724bb9">size</a>, takeOwnership);</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;    }</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160; </div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;    <span class="comment">//============================================================================</span></div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;    <span class="comment">// Method Description:</span></div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;<span class="comment"></span>    <span class="keyword">template</span>&lt;<span class="keyword">typename</span> dtype, <span class="keyword">typename</span> Bool,</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        std::enable_if_t&lt;std::is_same&lt;Bool, bool&gt;::value, <span class="keywordtype">int</span>&gt; = 0&gt;</div>
<div class="line"><a name="l00343"></a><span class="lineno"><a class="line" href="namespacenc.html#a39a0d39388c73f10ab8b462108675e98">  343</a></span>&#160;    <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a> <a class="code" href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">asarray</a>(dtype* ptr, <a class="code" href="namespacenc.html#af0f49663fb63332596e2e6327009d581">uint32</a> numRows, <a class="code" href="namespacenc.html#af0f49663fb63332596e2e6327009d581">uint32</a> numCols, Bool takeOwnership) noexcept</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;    {</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classnc_1_1_nd_array.html">NdArray&lt;dtype&gt;</a>(ptr, numRows, numCols, takeOwnership);</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;    }</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;}  <span class="comment">// namespace nc</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="anamespacenc_html_a25f36ba02112a206936fae22b0724bb9"><div class="ttname"><a href="namespacenc.html#a25f36ba02112a206936fae22b0724bb9">nc::size</a></div><div class="ttdeci">uint32 size(const NdArray&lt; dtype &gt; &amp;inArray) noexcept</div><div class="ttdef"><b>Definition:</b> size.hpp:45</div></div>
<div class="ttc" id="anamespacenc_html_a937b7ded9b21c92955e8ab137ad0b449"><div class="ttname"><a href="namespacenc.html#a937b7ded9b21c92955e8ab137ad0b449">nc::asarray</a></div><div class="ttdeci">NdArray&lt; dtype &gt; asarray(std::initializer_list&lt; dtype &gt; inList)</div><div class="ttdef"><b>Definition:</b> asarray.hpp:58</div></div>
<div class="ttc" id="aclassnc_1_1_nd_array_html"><div class="ttname"><a href="classnc_1_1_nd_array.html">nc::NdArray&lt; dtype &gt;</a></div></div>
<div class="ttc" id="anamespacenc_html_af0f49663fb63332596e2e6327009d581"><div class="ttname"><a href="namespacenc.html#af0f49663fb63332596e2e6327009d581">nc::uint32</a></div><div class="ttdeci">std::uint32_t uint32</div><div class="ttdef"><b>Definition:</b> Types.hpp:40</div></div>
<div class="ttc" id="a_nd_array_8hpp_html"><div class="ttname"><a href="_nd_array_8hpp.html">NdArray.hpp</a></div></div>
<div class="ttc" id="anamespacenc_html"><div class="ttname"><a href="namespacenc.html">nc</a></div><div class="ttdef"><b>Definition:</b> Coordinate.hpp:44</div></div>
<div class="ttc" id="a_type_traits_8hpp_html"><div class="ttname"><a href="_type_traits_8hpp.html">TypeTraits.hpp</a></div></div>
<div class="ttc" id="anamespacenc_html_a9bbe10d41fdbd74a6254bad44c7c7cf6"><div class="ttname"><a href="namespacenc.html#a9bbe10d41fdbd74a6254bad44c7c7cf6">nc::copy</a></div><div class="ttdeci">NdArray&lt; dtype &gt; copy(const NdArray&lt; dtype &gt; &amp;inArray)</div><div class="ttdef"><b>Definition:</b> copy.hpp:46</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_34171bd951b13a53aa9f237277a18e40.html">NumCpp</a></li><li class="navelem"><a class="el" href="dir_9051d82ec7b39b1c992f5bf2868571ca.html">Functions</a></li><li class="navelem"><a class="el" href="asarray_8hpp.html">asarray.hpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
